package com.itheima.service;

import com.itheima.domain.UserInfo;
import org.springframework.security.core.userdetails.UserDetailsService;

import java.util.List;


public interface UserService extends UserDetailsService {

    /*
    * 查询用户信息
    * */
    List<UserInfo> findAll()throws Exception;

    /*
    * 添加用户
    * */
    void save(UserInfo user)throws  Exception;

    /*
    * 根据id查询用户
    * */
    UserInfo findById(String id) throws Exception ;

    /*
    * 添加用户和角色的关联
    * */
    void addRoleToUser(String userId,String[] ids) throws Exception;
}
